package com.app.micaihu.bean.infor;

import android.text.TextUtils;

import com.app.micaihu.bean.comment.MyComment;
import com.app.micaihu.bean.interactive.IDefriend;
import com.app.micaihu.bean.news.NewsEntity;
import com.app.micaihu.bean.news.ShareBean;
import com.app.micaihu.configure.TypeConstant;

import java.util.List;

/**
 * 用户主页数据
 * Created by linkai on 2016/8/26.
 */
public class UserHomePage extends ShareBean implements IDefriend{

    private String nickName;//昵称
    private String headPic;//头像
    private String rankIcon;//军衔图标
    private String rankName;//军衔名称
    private String fans;//粉丝数
    private String follows;//关注数
    private String militaryTime;//参军时间
    private String isAttention;//关注状态  0未关注 1已关注 2互相关注
    private List<MyComment> cmtList;//我的评论


    //203新增字段
    private String signature;//签名
    private List<UserHomePageAttBean> attentionList;//关注的头像列表
    private List<UserHomePageNavBean> navList;//导航列表
    private String isAuthor;//是否是作者 1是作者,xuanqu newsList作为列表    0是非作者 选取cmtList作为列表
    private List<NewsEntity> newsList;//资讯列表
    private String isForbid;//是否被封号 1是被封号   0是非


    //204新增字段
    private String vip;//加V状态 0不加v 1加v
    private String isBlack; //是否在黑名单中 1是 0否

    //204 新增的接口参数
    private String toUid;
    private String militaryServices;
    private String warZone;
    private String armyGroup;
    private String gid;

    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }

    public String getMilitaryServices() {
        return militaryServices;
    }

    public void setMilitaryServices(String militaryServices) {
        this.militaryServices = militaryServices;
    }

    public String getWarZone() {
        return warZone;
    }

    public void setWarZone(String warZone) {
        this.warZone = warZone;
    }

    public String getArmyGroup() {
        return armyGroup;
    }

    public void setArmyGroup(String armyGroup) {
        this.armyGroup = armyGroup;
    }

    private List<String> honourIconList;//我的荣耀

    public List<String> getHonourIconList() {
        return honourIconList;
    }

    public void setHonourIconList(List<String> honourIconList) {
        this.honourIconList = honourIconList;
    }

    public boolean getVip() {
        return TextUtils.equals("1",vip);
    }

    public void setVip(String vip) {
        this.vip = vip;
    }

    public boolean getIsBlack() {
        return TextUtils.equals("1",isBlack);
    }

    public void setIsBlack(String isBlack) {
        this.isBlack = isBlack;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }


    public List<UserHomePageAttBean> getAttentionList() {
        return attentionList;
    }

    public void setAttentionList(List<UserHomePageAttBean> attentionList) {
        this.attentionList = attentionList;
    }

    public List<UserHomePageNavBean> getNavList() {
        return navList;
    }

    public void setNavList(List<UserHomePageNavBean> navList) {
        this.navList = navList;
    }

    public List<NewsEntity> getNewsList() {
        return newsList;
    }

    public void setNewsList(List<NewsEntity> newsList) {
        this.newsList = newsList;
    }

    public boolean getIsAuthor() {
//        return isAuthor;0是个人,1是作者
//        return TextUtils.equals("0",isAuthor) ? false : true;
        if(TextUtils.isEmpty(isAuthor)){
            return false;
        }

        if(TextUtils.equals("0",isAuthor)){
            return false;
        }

        return true;
    }

    public void setIsAuthor(String isAuthor) {
        this.isAuthor = isAuthor;
    }



    public boolean getIsForbid() {
        return TextUtils.equals(isForbid,"1");
    }

    public void setIsForbid(String isForbid) {
        this.isForbid = isForbid;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getHeadPic() {
        return headPic;
    }

    public void setHeadPic(String headPic) {
        this.headPic = headPic;
    }

    public String getRankIcon() {
        return rankIcon;
    }

    public void setRankIcon(String rankIcon) {
        this.rankIcon = rankIcon;
    }

    public String getRankName() {
        return rankName;
    }

    public void setRankName(String rankName) {
        this.rankName = rankName;
    }

    public String getFans() {
        return fans;
    }

    public void setFans(String fans) {
        this.fans = fans;
    }

    public String getFollows() {
        return follows;
    }

    public void setFollows(String follows) {
        this.follows = follows;
    }

    public String getIsAttention() {
        return isAttention;
    }

    public void setIsAttention(String isAttention) {
        this.isAttention = isAttention;
    }

    public List<MyComment> getCmtList() {
        return cmtList;
    }

    public void setCmtList(List<MyComment> cmtList) {
        this.cmtList = cmtList;
    }

    public String getMilitaryTime() {
        return militaryTime;
    }

    public void setMilitaryTime(String militaryTime) {
        this.militaryTime = militaryTime;
    }






    @Override
    public String getIDefriendType() {
        if(getIsBlack()){
            return TypeConstant.CANCLE_OPRATION;

        }else{
            return TypeConstant.CONFIRM_OPRATION;

        }
    }


    @Override
    public boolean getIInBlacklist() {
        return getIsBlack();
    }

    @Override
    public void setInBlacklist(String inBlacklist) {
        setIsBlack(inBlacklist);
    }

    @Override
    public String getIToUid() {
        return toUid;
    }

    @Override
    public void setIToUid(String toUid) {
        this.toUid = toUid;
    }
}
